﻿using Common.Data.Extensions;
using SalePerformance.Core.Configuration;
using SalePerformance.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SalePerformance.Core.Data.DBConfig
{
    public class BilAwardRankingDailyConfiguration : DBConfig<TblSaleContestBilawardRankingDaily>
    {
        public BilAwardRankingDailyConfiguration()
            : base(SystemConfiguration.Schema, SystemConfiguration.NamingType, SystemConfiguration.TABLE_PREFIX)
        {
            HasKey(k => new { k.Dao, k.TypeRank, k.BranchCodeSme, k.Region });

            //relationship
            //HasRequired(t => t.Branch).WithMany(c => c.CustomerRegions).HasForeignKey(t => new { t.BranchId }).WillCascadeOnDelete(false);
        }
    }
}
